# Maintainer: Bruno Pagani <archange@archlinux.org>

pkgname=libxmlb
pkgver=0.3.14
pkgrel=1
pkgdesc="Library to help create and query binary XML blobs"
arch=(loong64 x86_64)
url="https://github.com/hughsie/libxmlb"
license=(LGPL)
depends=(glib2 libstemmer xz zstd)
makedepends=(meson gobject-introspection gtk-doc)
checkdepends=(shared-mime-info)
source=("https://github.com/hughsie/libxmlb/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.xz"{,.asc})
sha256sums=('a2f0056eed14ff791aee2b08b1514a0f1b6cf215f0579138a8cae8c45a0d3b0f'
            'SKIP')
validpgpkeys=(163EB50119225DB3DF8F49EA17ACBA8DFA970E17) # Richard Hughes <richard@hughsie.com>

build() {
  arch-meson ${pkgname}-${pkgver} build -D stemmer=true
  ninja -v -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "${pkgdir}"
  rm -r "${pkgdir}"/usr/{lib,share}/installed-tests/
}
